﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using WP8.EmpezandoComunicacion.ServiceReference1;

namespace WP8.EmpezandoComunicacion.Pages
{
    public partial class ReferenciaServicioPage : PhoneApplicationPage
    {
        public ReferenciaServicioPage()
        {
            InitializeComponent();
        }

        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            var client = new Service1Client();
            client.GetDataCompleted += (s, a) =>
            {
                this.txtResultado.Text = a.Result;
            };
            client.GetDataAsync(3);

            base.OnNavigatedTo(e);
        }
    }
}